package com.zjsd.sqeybusiness.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsd.sqeybusiness.mapper.ApplySampleMapper;
import com.zjsd.sqeybusiness.domain.ApplySample;
import com.zjsd.sqeybusiness.service.IApplySampleService;

/**
 * 申请样品Service业务层处理
 *
 * @author Zheng
 * @date 2020-11-05
 */
@Service
public class ApplySampleServiceImpl implements IApplySampleService
{
    @Autowired
    private ApplySampleMapper applySampleMapper;

    /**
     * 查询申请样品
     *
     * @param applyId 申请样品ID
     * @return 申请样品
     */
    @Override
    public ApplySample selectApplySampleById(Long applyId)
    {
        return applySampleMapper.selectApplySampleById(applyId);
    }

    /**
     * 查询申请样品列表
     *
     * @param applySample 申请样品
     * @return 申请样品
     */
    @Override
    public List<ApplySample> selectApplySampleList(ApplySample applySample)
    {
        return applySampleMapper.selectApplySampleList(applySample);
    }

    /**
     * 新增申请样品
     *
     * @param applySample 申请样品
     * @return 结果
     */
    @Override
    public int insertApplySample(ApplySample applySample)
    {
        applySample.setCreateTime(DateUtils.getNowDate());
        return applySampleMapper.insertApplySample(applySample);
    }

    /**
     * 修改申请样品
     *
     * @param applySample 申请样品
     * @return 结果
     */
    @Override
    public int updateApplySample(ApplySample applySample)
    {
        return applySampleMapper.updateApplySample(applySample);
    }

    /**
     * 批量删除申请样品
     *
     * @param applyIds 需要删除的申请样品ID
     * @return 结果
     */
    @Override
    public int deleteApplySampleByIds(Long[] applyIds)
    {
        return applySampleMapper.deleteApplySampleByIds(applyIds);
    }

    /**
     * 删除申请样品信息
     *
     * @param applyId 申请样品ID
     * @return 结果
     */
    @Override
    public int deleteApplySampleById(Long applyId)
    {
        return applySampleMapper.deleteApplySampleById(applyId);
    }
}
